// Angular Key Value Editor styles

.key-value-editor,
.environment-from-editor {
  // .form-control styles duplicated from bower_components/patternfly/less/lib/boostrap/forms.less and bower_components/patternfly/less/forms.less
  .faux-form-control {
    background-color: @input-bg;
    background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
    border: 1px solid @input-border;
    border-radius: @input-border-radius; // Note: This has no effect on <select>s in some browsers, due to the limited stylability of <select>s in CSS.
    .box-shadow(inset 0 1px 1px rgba(0,0,0,.075));
    color: @input-color;
    display: table-cell;
    font-size: @font-size-base;
    height: @input-height-base; // Make inputs at least the height of their button counterpart (base line-height + padding + border)
    line-height: @line-height-base;
    padding: @padding-base-vertical @padding-base-horizontal;
    .transition(~"border-color ease-in-out .15s, box-shadow ease-in-out .15s");
    width: 100%;
    .word-break-all(); // required for Firefox
    &.readonly {
      background-color: @input-bg-disabled;
      .box-shadow(none);
      color: @color-pf-black-500;
      opacity: 1; // iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655
      &:hover {
        border-color: @input-border;
      }
    }
  }

  // .form-control-addon styles duplicated from bower_components/patternfly/less/lib/boostrap/forms.less
  .faux-form-control-addon {
    background-color: @input-group-addon-bg;
    border: 1px solid @input-group-addon-border-color;
    border-radius: @input-border-radius;
    color: @input-color;
    display: table-cell;
    font-size: @font-size-base;
    font-weight: normal;
    line-height: 1;
    margin-right: 2px;
    padding: @padding-base-vertical @padding-base-horizontal;
    text-align: center;
    vertical-align: middle; // Match the inputs
    white-space: nowrap;
    width: 1%;
    &:first-child {
      border-right: 0;
    }
    span[title]:not([data-original-title=""]) {
      cursor: help;
    }
  }

  .faux-input-group {
    border-collapse: separate;
    display: table;
    position: relative;
    &.faux-input-single-input {
      width: 100%;
    }
  }
  .environment-from-entry {
    .environment-from-input {
      .faux-input-group,
      .ui-select {
        float: left;
        width: 100%;
      }
      .has-warning {
        display: inline-block;
      }
    }
    .environment-from-view-details {
      padding: 5px 0 0;
      text-align: right;
    }
  }
  .key-value-editor-input .ui-select {
    @media(min-width: @screen-md-min) {
      float: left;
      width: 50%;
    }
    + .ui-select {
      padding-top: 5px;
      @media(min-width: @screen-md-min) {
        padding-top: 0;
        padding-left: 5px;
      }
    }
  }
}
